package java0710test05;

public class Banana extends Fruit {
	
	//统计香蕉数量
	static int countBanana = 0;

	/**
	 * 香蕉的构造方法
	 */
	public Banana() {
		
		countBanana++;
	}

	/**
	 * 获取香蕉的生产数量
	 * @return
	 */
	public static int getCountBanana() {
		return countBanana;
	}

	@Override
	public Fruit fetchfruit() {
		System.out.println("创建了一个香蕉类的对象");
		Fruit fruit = new Banana();
		return fruit;
	}
	
	
}
